package com.msds.parent.persist.mapper;

import com.msds.parent.persist.po.ARole;
import com.msds.parent.persist.po.ARoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ARoleMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @SelectProvider(type=ARoleSqlProvider.class, method="countByExample")
    long countByExample(ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @DeleteProvider(type=ARoleSqlProvider.class, method="deleteByExample")
    int deleteByExample(ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @Delete({
        "delete from a_role",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @Insert({
        "insert into a_role (id, name, ",
        "status, createTime, ",
        "updateTime, pubTime, ",
        "content)",
        "values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP}, ",
        "#{updatetime,jdbcType=TIMESTAMP}, #{pubtime,jdbcType=TIMESTAMP}, ",
        "#{content,jdbcType=LONGVARCHAR})"
    })
    int insert(ARole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @InsertProvider(type=ARoleSqlProvider.class, method="insertSelective")
    int insertSelective(ARole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @SelectProvider(type=ARoleSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updatetime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="pubTime", property="pubtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<ARole> selectByExampleWithBLOBs(ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @SelectProvider(type=ARoleSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updatetime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="pubTime", property="pubtime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<ARole> selectByExample(ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @Select({
        "select",
        "id, name, status, createTime, updateTime, pubTime, content",
        "from a_role",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
        @Result(column="createTime", property="createtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updatetime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="pubTime", property="pubtime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="content", property="content", jdbcType=JdbcType.LONGVARCHAR)
    })
    ARole selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @UpdateProvider(type=ARoleSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ARole record, @Param("example") ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @UpdateProvider(type=ARoleSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") ARole record, @Param("example") ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @UpdateProvider(type=ARoleSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") ARole record, @Param("example") ARoleExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @UpdateProvider(type=ARoleSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ARole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @Update({
        "update a_role",
        "set name = #{name,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "createTime = #{createtime,jdbcType=TIMESTAMP},",
          "updateTime = #{updatetime,jdbcType=TIMESTAMP},",
          "pubTime = #{pubtime,jdbcType=TIMESTAMP},",
          "content = #{content,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(ARole record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table a_role
     *
     * @mbg.generated Thu Sep 28 17:34:25 CST 2017
     */
    @Update({
        "update a_role",
        "set name = #{name,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=TINYINT},",
          "createTime = #{createtime,jdbcType=TIMESTAMP},",
          "updateTime = #{updatetime,jdbcType=TIMESTAMP},",
          "pubTime = #{pubtime,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ARole record);
}